<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/common.jspf"%>
<%@ include file="/common/taglibs.jspf"%>
<html>
<meta name="decorator" content="popup" />
<head>
</head>
<body>
	<input type="hidden" id=${order.id } />
	<fieldset>
		<legend>
			<s:message code="tenantOrder.ui.fieldset.payInfo" />
		</legend>
		<ul class="inline" id="payChannel">
			<li class="span4"><label class="radio"><input type="radio" name="payChannel" value="wechat_pay" checked="true"><img src="${contextPath}/upload/wechat_pay.png"></label></li>
			<li class="span4"><label class="radio"><input type="radio" name="payChannel" value="alipay">支付宝</label></li>
			<li class="span4"><label class="radio"><input type="radio" name="payChannel" value="transfer">公司转账</label></li>
		</ul>
	</fieldset>
	 <div class="form-actions">
		<button type="button" onclick="payOrder();" class="btn btn-primary" data-loading-text="<s:message code='common.processing' />"><i class="icon-ok"></i> <s:message code="btn.submit" /></button>
	  </div>
	<script type="text/javascript">
		function payOrder() {
			
			var payChannel = $('input[name="payChannel"]:checked').val();

			if (payChannel == "wechat_pay") {
				location.href = "${contextPath}/system/wechatPay/pay.do?orderNo=${order.orderNo}&orderFee= ${order.amount}&productId= ${order.productNo}";

			} else {
				var index = parent.layer.getFrameIndex(window.name);
				parent.layer.close(index);

			}

		}
	</script>
</body>
</html>
